package insat.challenge;

import android.app.Activity;
import android.content.Context;
import android.content.Intent;
import android.net.Uri;
import android.os.Bundle;
import android.telephony.PhoneStateListener;
import android.telephony.TelephonyManager;
import android.text.Editable;
import android.util.Log;
import android.view.View;
import android.view.View.OnClickListener;
import android.widget.Button;
import android.widget.EditText;
import android.widget.Toast;

public class EmergencycallsActivity extends DashboardActivity {

	private Button btn_secoursmedico;
	private Button btn_policesecours;
	private Button btn_protectioncivile;

	@Override
	protected void onCreate(Bundle savedInstanceState) {

		super.onCreate(savedInstanceState);
		setContentView(R.layout.emergencycalls);

		btn_secoursmedico = (Button) findViewById(R.id.bt_secoursmedico);
		btn_policesecours = (Button) findViewById(R.id.bt_policesecours);
		btn_protectioncivile = (Button) findViewById(R.id.bt_protectioncivile);

		btn_secoursmedico.setOnClickListener(new OnClickListener() {

			public void onClick(View v) {
				Intent intent = new Intent(Intent.ACTION_CALL, Uri
						.parse("tel:190"));
				startActivity(intent);

			}
		});

		btn_policesecours.setOnClickListener(new OnClickListener() {

			public void onClick(View v) {
				Intent intent = new Intent(Intent.ACTION_CALL, Uri
						.parse("tel:197"));
				startActivity(intent);

			}
		});

		btn_protectioncivile.setOnClickListener(new OnClickListener() {

			public void onClick(View v) {
				Intent intent = new Intent(Intent.ACTION_CALL, Uri
						.parse("tel:198"));
				startActivity(intent);

			}
		});

	}
}
